package java_thinking.unit_17._17_7_8;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2019-04-18 0:04
 */
class Groundhog2 extends Groundhog {


    public Groundhog2(int number) {
        super(number);
    }

    @Override
    public int hashCode() {
        return number;
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof Groundhog2 && number == ((Groundhog2)obj).number;
    }
}

public class SpringDetector2 {
    public static void main(String[] args) throws Exception{
        SpringDetector.detecting(Groundhog2.class);
    }
}
